<!DOCTYPE html>
<html>
<head>
<title>电影抢购</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Vogue Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href="http://139.199.164.23/moana/static/css/bootstrap.css" rel='stylesheet' type='text/css' />
<link href="http://139.199.164.23/moana/static/css/style.css" rel='stylesheet' type='text/css' />
<script src="http://139.199.164.23/moana/static/js/jquery-1.11.0.min.js"></script>
<script src="http://139.199.164.23/moana/static/js/imgHeight.js"></script>
<link href='http://fonts.useso.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.useso.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<!---- start-smoth-scrolling---->
<script type="text/javascript" src="http://139.199.164.23/moana/static/js/move-top.js"></script>
<script type="text/javascript" src="http://139.199.164.23/moana/static/js/easing.js"></script>


<script type="text/javascript">

	var images=new Array();
	var data;
	
	function getData(){
		$.ajax({
			type:"POST",
			url:"http://139.199.164.23/moana/movieData/getMovieList.do",
			success:function(value){
			data=JSON.parse(value);
			for(item in data){
				images[item]=new Image().src="http://139.199.164.23/moana/static/"+data[item][7];
			}
			if(data==null){
				alert("电影列表为空");
			}
			},
			error:function(){
				alert("请求失败");
			}
		});
		
	}
	function searchInfo(){
		
			var html='<div class="welcome" id="movieList">';
			var row='<div class="container">'+
						'<div class="welcome-top row">';
			html+=row;
			var i=1;
			var image;
			var link='<a href="http://139.199.164.23/moana/static/movieShow.html?id=';
			for(item in data){
				
				image='otherImg';
				var am=data[item];
				if(i%4==0){
					html+="</div></div>";
					html+=row;
				}
				if(i==1){
					image="firstImg";
				}
				
				var id=am[0].toString();
				html+='<div class="col-md-4 col-lg-4 welcome-left ' +image+
							 ' "><div class="thumbnail">'+
							 		'<img src="' +images[item] +'" alt="...">'+
                             	'<div class="caption">'+
                                       '<div class="welcome-bottom">'+
                                                               link+id+' ">'+
													'<h3>'+am[5]+'</h3>'+
											' </a></div>'+
								      '</div>'+
						  		'</div>'+
					 	'</div>';
				
				i++;
			}
			
			html+='</div></div></div>';
			document.getElementById("movieList").innerHTML = html;
			
			//设置响应式布局
			$(".otherImg img").css("height",$(".firstImg img").height());
			
		
		
		
	}
</script>


<script type="text/javascript">
			getData();
			jQuery(document).ready(function($) {
				var username=GetCookie("username")
				if(username!=null){
					$("#username span").text(username);
					$("#loginOut,#username").css('display','inline-block');
					
					
				}
				
				/* searchInfo(); */
				setTimeout("searchInfo(); ",1200); 
				$(".scroll").click(function(event){		
					event.preventDefault();
					$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
				});
				
				
				window.addEventListener("resize",function(){
				
					$(".otherImg img").css("height",$(".firstImg img").height());
				},false);
				
				
				
			});
</script>


<!--start-smoth-scrolling-->
</head>
<body>
	<!--banner-starts-->
	<div class="bnr" id="home">
		<div  id="top" class="callbacks_container">
			<ul class="rslides" id="slider4">
			    <li>
					<div class="banner">
						<div class="container">
							<div class="logo">
								<a href="index.html"><img src="http://139.199.164.23/moana/static/images/logo.png" alt="" /></a>
							</div>
							
						</div>
					</div>
				</li>
				<li>
					<div class="banner-1">
						<div class="container">
							<div class="logo">
								<a href="index.html"><img src="http://139.199.164.23/moana/static/images/logo.png" alt="" /></a>
							</div>
							
						</div>
					</div>
				</li>
				<li>
					<div class="banner-2">
						<div class="container">
							<div class="logo">
								<a href="index.html"><img src="http://139.199.164.23/moana/static/images/logo.png" alt="" /></a>
							</div>
							
						</div>
					</div>
				</li>
			</ul>
		</div>
		<div class="clearfix"> </div>
	</div>
	<!--banner-ends--> 
   
	<!--Slider-Starts-Here-->
				<script src="http://139.199.164.23/moana/static/js/responsiveslides.min.js"></script>
			 <script>
			    // You can also use "$(window).load(function() {"
			    $(function () {
			      // Slideshow 4
			      $("#slider4").responsiveSlides({
			        auto: true,
			        pager: false,
			        nav: true,
			        speed: 500,
			        namespace: "callbacks",
			        before: function () {
			          $('.events').append("<li>before event fired.</li>");
			        },
			        after: function () {
			          $('.events').append("<li>after event fired.</li>");
			        }
			      });
			
			    });
			  </script>
			<!--End-slider-script-->
	<!--header-starts-->
	
	<div class="header-bottom">
	 <div class="fixed-header">
		<div class="container">
			
			<div class="header-right">
				<ul id="header">
					
					<li><a href="http://139.199.164.23/moana/static/login.html"><span class="qq"></span></a></li>
					<li><a href="http://139.199.164.23/moana/static/login.html"><span class="sina"></span></a></li>
					<li style="display:none" id="username"><a href="javascript:void(0);" ><span ></span></a></li>
					<li style="display:none" id="loginOut"><a href="javascript:void(0);" ><span >退出登录</span></a></li>
					<!--  -->
				</ul>
		
			</div>
			<div class="clearfix"></div>
			<script>
			$(document).ready(function() {
				 var navoffeset=$(".header-bottom").offset().top;
				 $(window).scroll(function(){
					var scrollpos=$(window).scrollTop(); 
					if(scrollpos >=navoffeset){
						$(".header-bottom").addClass("fixed");
					}else{
						$(".header-bottom").removeClass("fixed");
					}
				 });
				 
			});
			</script>
		</div>
	 </div>
	 </div>
	<!--header-ends-->

	<!--welcome-starts-->
	<div class="welcome" id="movieList">
	
	</div>	 
	<!--welcome-ends-->
	
	
	<!--Slider-Starts-Here-->
			 <script>
			    // You can also use "$(window).load(function() {"
			    $(function () {
			      // Slideshow 5
			      $("#slider5").responsiveSlides({
			        auto: true,
			        pager: true,
			        nav: false,
			        speed: 500,
			        namespace: "callbacks",
			        before: function () {
			          $('.events').append("<li>before event fired.</li>");
			        },
			        after: function () {
			          $('.events').append("<li>after event fired.</li>");
			        }
			      });
			
			    });
			  </script>
			<!--End-slider-script-->
	
		<script type="text/javascript">
									$(document).ready(function() {
										$().UItoTop({ easingType: 'easeOutQuart' });
										
									});
								</script>
		<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
	
	<!--footer-starts-->
		<div class="footer" align="center">
			Copyright©2016  马楚勋.All Rights Reserved.Contact:969053992@qq.com.
		</div>
<script type="text/javascript" src="http://139.199.164.23/moana/static/js/cookie.js"></script>
</body>
</html>